package models

import "gorm.io/gorm"

type Shops struct {
	gorm.Model
	Name        string  `gorm:"type:varchar(30);not null"`
	Price       float64 `gorm:"type:decimal(10,2);not null"`
	Description string  `gorm:"type:varchar(30);not null"`
	Stock       int     `gorm:"type:int;not null"`
}

func (s *Shops) Find() (shops []*Shops, err error) {
	err = DB.Find(&shops).Error
	return
}
